/**
 * HandlerThreadFactory.java
 * 版权所有(C) 2013
 * 创建者:cuiran 2013-12-2 下午2:07:46
 */
package com.ghyf.mplay.net.log.thread;

import java.util.concurrent.ThreadFactory;

/**
 *  
 * @author cuiran
 * @version 1.0.0
 */
public class HandlerThreadFactory implements ThreadFactory {

	/* (non-Javadoc)
	 * @see java.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
	 */
	@Override
	public Thread newThread(Runnable r) {
		
		Thread t = new Thread(r);
		t.setUncaughtExceptionHandler(new MyUncaughtExceptionHandler());
		return t;
	
	}

}
